package net.xdclass.manager;

import com.baomidou.mybatisplus.core.metadata.IPage;
import net.xdclass.model.TrafficDO;

/**
 * @author Allen
 * @version 1.0
 * @date 2022/12/7 11:42
 */
public interface TrafficManager {

	/**
	 * 新增流ᰁ包
	 *
	 * @param trafficDO
	 * @return
	 */
	int add(TrafficDO trafficDO);

	/**
	 * 分⻚查询可⽤的
	 *
	 * @param page
	 * @param size
	 * @param accountNo
	 * @return
	 */
	IPage<TrafficDO> pageAvailable(Integer page, Integer size, Long accountNo);

	/**
	 * @param currentTrafficId
	 * @param accountNo
	 * @param dayUsedTimes
	 */
	int addDayUsedTimes(Long currentTrafficId, Long accountNo, Integer dayUsedTimes);

	/**
	 * 查找流ᰁ包详情
	 *
	 * @param trafficId
	 * @param accountNo
	 * @return
	 */
	TrafficDO findByIdAndAccountNo(Long trafficId, Long accountNo);

}

